import request from '@/utils/request'

export function login(data) {
  return request({
    method: 'POST',
    url: '/sys/login',
    data
  })
}

export function getUserInfo() {
  return request({
    method: 'POST',
    url: '/sys/profile'
  })
}

/**
 * 获取用户的详细信息
 * @param {*} id 用户的ID
 * @returns
 */
export function getUserDetail(id) {
  return request({
    method: 'GET',
    url: `/employees/${id}/personalInfo`
  })
}
